package cn.xiaoyu.snake.net;

import java.util.Map;

import cn.xiaoyu.snake.net.callback.IError;
import cn.xiaoyu.snake.net.callback.IFailure;
import cn.xiaoyu.snake.net.callback.IRequest;
import cn.xiaoyu.snake.net.callback.ISuccess;
import okhttp3.RequestBody;

/**
 * Created by fengzhe on 2017/7/19.
 */

public class RestClient {

    private final String URL;
    private final Map<String, Object> PARAMS;
    private final IRequest IREQUEST;
    private final ISuccess ISUCCESS;
    private final IFailure IFAILURE;
    private final IError IERROR;
    private final RequestBody BODY;


    public RestClient(String url, Map<String, Object> params, IRequest irequest, ISuccess isuccess, IFailure ifailure, IError ierror, RequestBody body) {
        URL = url;
        PARAMS = params;
        IREQUEST = irequest;
        ISUCCESS = isuccess;
        IFAILURE = ifailure;
        IERROR = ierror;
        BODY = body;
    }

    public static RestClientBuilder builder() {
        return new RestClientBuilder();
    }
}
